apiVersion: v1
kind: Pod
metadata:
  annotations:
    scheduler.alpha.kubernetes.io/critical-pod: ""
  labels:
    component: kube-scheduler
    tier: control-plane
  name: kube-scheduler
  namespace: kube-system
spec:
  hostNetwork: true
  containers:
  - name: kube-scheduler
# gcr.io/google_containers
    image: mirrorgooglecontainers/kube-scheduler-amd64:v1.10.0
    command:
      - kube-scheduler
      - --v=0
      - --logtostderr=true
      - --address=127.0.0.1
      - --leader-elect=true
      - --kubeconfig={{ kubernetes_path }}/scheduler.conf
    livenessProbe:
      failureThreshold: 8
      httpGet:
        host: 127.0.0.1
        path: /healthz
        port: 10251
        scheme: HTTP
      initialDelaySeconds: 15
      timeoutSeconds: 15
    resources:
      requests:
        cpu: 100m
    volumeMounts:
    - mountPath: {{ kubernetes_pki }}
      name: k8s-certs
      readOnly: true
    - mountPath: {{ kubernetes_path }}/scheduler.conf
      name: kubeconfig
      readOnly: true
  volumes:
  - hostPath:
      path: {{ kubernetes_pki }}
      type: DirectoryOrCreate
    name: k8s-certs
  - hostPath:
      path: {{ kubernetes_path }}/scheduler.conf
      type: FileOrCreate
    name: kubeconfig
